package oop3;

/**
 * @author oldliu
 * @since 1.0
 */
//公交
public class Bus {
    String no;//车牌
    String line;
    String from;
    String to;

    public Bus() {
    }

    public Bus(String line) {
        this.line = line;
    }

    public Bus(String no, String line, String from, String to) {
        this.no = no;
        this.line = line;
        this.from = from;
        this.to = to;
    }

    public void work() {
        System.out.println("这是" + line + "路公交,车牌是" + no);
        System.out.println("往返于" + from + "和" + to);
    }
}
